/**
* Author: Samfu
* Time  : 上午1:44:26
* Desc  : 
*/
package com.fu.moneybag.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

<<<<<<< HEAD
import org.apache.ibatis.annotations.Param;

=======
>>>>>>> e0880f57468c829d7f55dfe5963927c05e7bee9a
import com.fu.moneybag.entity.Article;
import com.fu.moneybag.entity.User;

public interface ArticleService {

	/**
	 * 添加文章
	 * @param user
	 * @param articleTitle
	 * @param articleType
	 * @param articleContent
	 * @return
	 */
	public int addArticle(User user, String articleTitle, String articleType, String articleContent);
	
	/**
	 * 
	 * @param userId
	 * @return
	 */
	public List<Article> getAllArticles(long userId);
	
	/**
	 * 
	 * @param articleId
	 * @return
	 */
	public Article getArticleByArticleId(long articleId);
	
	/**
	 * 
	 * @param articleId
	 * @param authorId
	 * @return
	 */
	public int deleteArticleById(long articleId, long authorId);
	
	/**
	 * 
	 * @param article
	 * @param articleId
	 * @param authorId
	 * @return
	 */
	public int updateArticleById(String articleTitle, String articleType, String articleContent, long articleId, long authorId);

	public String createArticle(String articleTitle, String articleType, String articleContent, HttpServletRequest request, HttpSession session);

	public List<Article> getArticleByType(String articleType);
	
	public String deleteArticleById(HttpServletRequest request, HttpSession session, long articleId, long userId);
	
<<<<<<< HEAD
	public List<Article> getArticleByPage(@Param(value="startPos") Integer startPos,
			@Param(value="pageSize") Integer pageSize, @Param(value="userId") long userId);
	
	public List<Article> getArticleByPageAndType(@Param(value="startPos") Integer startPos,
			@Param(value="pageSize") Integer pageSize, @Param(value="userId") long userId,
			@Param(value="articleType") String articleType);
	
=======
>>>>>>> e0880f57468c829d7f55dfe5963927c05e7bee9a
}
